* OPEN STATA OUTPUT FILE LOG *

*log using "C:\Users\gk57526\Dropbox\Confirmation Dynamics Project (Jason Byers)\Nominee Characteristics Project\JOP DRM\Output\MANUSCRIPT MODELS.04-18-2021.smcl", replace

log using "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Output/MANUSCRIPT MODELS.04-18-2021.smcl", replace

   
   
   ****** CASES NATURALLY OMITTED WHERE AGENCY IDEOLOGY IS A MISSING VALUE SINCE NO ESTIMATE IS AVAILABLE FOR SUCH AGENCIES FOR N = 67 NOMINEE CASES    
   ******  [TRUNCATED + FULL SAMPLE: N = 1,278] FOR COMPARABILITY PURPOSES DUE TO "SENMAJAGENCYIDEOLOPPOSE" & "SENMAJAGENCYIDEOLALIGN" COVARIATES PREMISED ON AGENCY IDEOLOGY **** 

   
   
   ****** ANALYSIS OF MANUSCRIPT MODELS PROGRAM FILE: OMITTING SAMPLE SELECTION BIAS FROM N = 265 UNCONFIRMED CASES, ///
   ******  BUT ACCOUNTING FOR 22 RIGHT-CENSORED CASES CONFIRMED IN FUTURE CONGRESS OBSERVED IN KRAUSE & O'CONNELL DATABASE [NOT THWARTED BY FORMAL PROCEDURES] ****** 
   
   


   
   
    **** PROGRAM FILE FOR "CONFIRMATION DYNAMICS" PROJECT: TESTING 'DUE DILIGENCE' THEORY HYPOTHESES [N = 1,013: N = 991: UNCENSORED, N = 22: CENSORED] ****
   
   

   
   **** QUANTILE SURVIVAL MODELS: ASYMMETRIC LAPLACE MLE CONDITIONAL DENSITY SURVIVAL MODELS OF CONFIRMATION DECAY ****
 
 

 * OPEN UPDATED "CONFIRMATION DYNAMICS" DATABASE [08-13-2020] *

*use "C:\Users\gk57526\Dropbox\Confirmation Dynamics Project (Jason Byers)\Nominee Characteristics Project\JOP DRM\Data\Confirmation Dynamics.Database.08-13-2020.FINAL.dta", replace

use "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Data/Confirmation Dynamics.Database.08-13-2020.FINAL.dta", replace



******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************



*** "DUE DILIGENCE" CONTEXTUAL EFFECTS BASED ON POSITION TYPE [TIER 1 VERSUS TIER 2 NOMINEE SLOPE DIFFERENCES] ***
*** NOTE: CONTEXTUAL VARIABLES THAT APPEAR MULTIPLICATIVE/INTERACTION FORM ARE RESCALED TO BE ZERO BOUNDED FOR EASE OF INTERPRETATION OF ADDITIVE BASELINE EFFECTS ***



***************************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************
*******************************************************************************************************************************************************************************




**** OUTCOME EQUATIONS: PREDICT CONFIRMATION DELAY DURATION (IN DAYS) USING SINGLE RECORD EVENTS ****






** H1 & H2: CONDITIONAL POLITICAL FRAGMENTATION EFFECTS [INTER-BRANCH & INTRA-BRANCH COORDINATION] CONDITIONED BY NOMINEE POSITION TYPE ***



** BASIS FOR H1: SOP/EXTERNAL FRAGMENTATION BETWEEN PRESIDENT AND SENATE SHOULD EXACERBATE DELAY MORE FOR "TIER 2" NOMINEES COMPARED TO "TIER 1" NOMINEES **

** BASIS FOR H2: INTERNAL LEGISLATIVE FRAGMENTATION WITHIN THE SENATE MAKE COORDINATION COSTS HIGHER FOR "TIER 2" NOMINEES COMPARED TO "TIER 1" NOMINEES **



***  H3 & H4:  CONDITIONAL ADMINISTRATIVE RESPONSIVENESS EFFECTS [AGENCY INSULATION AND PRESIDENTIAL LOYALTY] CONDITIONED BY NOMINEE POSITION TYPE ***




*** NOTE: "ZB" refers to rescaled measures of key covariates scores that equal (or approximtately equal) zero for the covariate in question *** 



*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************




*** PART 1: MODELS ANALAYZING OVERALL/TOTAL CONFIRMATION DELAY [CONFIRMATION DATE - NOMINATION DATE] *** 


                                                                                                                                                                                                                                                               

*** MODEL 1: PREDICTING TIME FROM NOMINATION TO TIME TO CONFIRMATION ON SENATE FLOOR [confdur] - NON-AUGMENTED MODEL (DOES NOT ACCOUNT FOR SAMPLE SELECTION BIAS) ****


 
*** ASYMMETRIC LAPLACE MLE CONDITIONAL QUANTILE SURVIVAL REGRESSION PERCENTILES ["DUE DILIGENCE" MODEL] ***

laplacereg confdur filipresdistancelewiszb filipresdistlewiszbtoplev2  senpartydiffmedianlewiszb senpartydiffmedlewiszbtoplev2  senworkload senhearing excalendarcong ///
senmajagencyideoloppose senmajagencyideolalign agencyindzb  agencyindzbtoplev2  soucountagency1  presappnom endsession newpresterm fvatreated ///
toplevel2 zloyalmedianzb zloyalmedianzbtoplev2 zmecompmedian zpecompmedian  gender minority admintermyr1  admintermyr2 admintermyr3 ///
bush41 clinton bush43 if confirmselectin==1, failure(confirmobserved) quantiles (1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99) ///
seed(123) reps(1000)
*
estimates store model1
estout model1, cells(b(star fmt(3)) se(par fmt(2)))

***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 

*** POST-ESTIMATION LINCOMS ONLY FOR CONTEXTUAL POSITION TYPE SLOPE PARAMETER DIFFERENCES FOR "DUE DILIGENCE" COVARIATES ///
*** TO EVALUATE MAX-MIN RANGE IMPACT OF COVARIATE ON CONFIRMATION DELAY OUTCOME VARIABLE ***
  

***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 
 
set matsize 800           
 
*** ESTIMATE CONDITIONAL MIN - MAX [0.401 - 0.000 = 0.401] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q05]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q10]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q15]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q20]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q25]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q30]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q35]filipresdistlewiszbtoplev2   * 0.401 
*
lincom [q40]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q45]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q50]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q55]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q60]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q65]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q70]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q75]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q80]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q85]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q90]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q95]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q99]filipresdistlewiszbtoplev2   * 0.401
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use1.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']filipresdistlewiszbtoplev2 * 0.401
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use1.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("|President-Senate Filibuster Pivot|", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-50(50)150, angle(0)) legend(off) yline(0,lcolor(gs8) lpatter(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure2A.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure2A.eps"
***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 


*** ESTIMATE CONDITIONAL MIN - MAX [0.118 - 0.000 = 0.118] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q05]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q10]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q15]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q20]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q25]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q30]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q35]senpartydiffmedlewiszbtoplev2 * 0.118 
*
lincom [q40]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q45]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q50]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q55]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q60]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q65]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q70]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q75]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q80]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q85]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q90]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q95]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q99]senpartydiffmedlewiszbtoplev2 * 0.118
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use2.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']senpartydiffmedlewiszbtoplev2 * 0.118
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use2.xlsx", sheet("Sheet1") clear


twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Senate Party Polarization", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-300(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure2B.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure2B.eps"


***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 
 
*** ESTIMATE CONDITIONAL MIN - MAX [2.673 - 0 = 2.673] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]agencyindzbtoplev2 * 2.673
*
lincom [q05]agencyindzbtoplev2 * 2.673
*
lincom [q10]agencyindzbtoplev2 * 2.673
*
lincom [q15]agencyindzbtoplev2 * 2.673
*
lincom [q20]agencyindzbtoplev2 * 2.673
*
lincom [q25]agencyindzbtoplev2 * 2.673
*
lincom [q30]agencyindzbtoplev2 * 2.673
*
lincom [q35]agencyindzbtoplev2 * 2.673 
*
lincom [q40]agencyindzbtoplev2 * 2.673
*
lincom [q45]agencyindzbtoplev2 * 2.673
*
lincom [q50]agencyindzbtoplev2 * 2.673
*
lincom [q55]agencyindzbtoplev2 * 2.673
*
lincom [q60]agencyindzbtoplev2 * 2.673
*
lincom [q65]agencyindzbtoplev2 * 2.673
*
lincom [q70]agencyindzbtoplev2 * 2.673
*
lincom [q75]agencyindzbtoplev2 * 2.673
*
lincom [q80]agencyindzbtoplev2 * 2.673
*
lincom [q85]agencyindzbtoplev2 * 2.673
*
lincom [q90]agencyindzbtoplev2 * 2.673
*
lincom [q95]agencyindzbtoplev2 * 2.673
*
lincom [q99]agencyindzbtoplev2 * 2.673
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use3.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']agencyindzbtoplev2 * 2.673
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use3.xlsx", sheet("Sheet1") clear


twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Decision Maker Independence", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-400(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure2C.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure2C.eps"


***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 
 
*** ESTIMATE CONDITIONAL MIN - MAX [4.6155 - 0.039 = 4.5765] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q05]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q10]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q15]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q20]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q25]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q30]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q35]zloyalmedianzbtoplev2  * 4.5765 
*
lincom [q40]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q45]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q50]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q55]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q60]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q65]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q70]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q75]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q80]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q85]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q90]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q95]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q99]zloyalmedianzbtoplev2  * 4.5765
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use4.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']zloyalmedianzbtoplev2 * 4.5765
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use4.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Presidential Nominee Loyalty", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-200(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure2D.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure2D.eps"
*
* 
*
*graph 1
cd "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript"
* 
gr combine Figure2A.gph  Figure2B.gph, b1title("Quantiles") iscale(1) 

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure2ABcomb.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure2ABcomb.eps"

*graph 2 
gr combine Figure2C.gph Figure2D.gph, b1title("Quantiles") iscale(1)

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure2CDcomb.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure2CDcomb.eps"




************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 

 



*** PART 2: MODELS ANALYZING SENATE COMMITTEE CONFIRMATION DELAY: INFORMATIONAL VETTING [REPORTED OUT OF SENATE COMMITTEE DATE - NOMINATION DATE] *** 

use "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Data/Confirmation Dynamics.Database.08-13-2020.FINAL.dta", replace


************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************ 
                                                                                                                                                                                                                                                                   

*** MODEL 2: PREDICTING TIME FROM NOMINATION TO TIME TO REPORTED OUT OF SENATE COMMITTEE [LEGVETDUR] - NON-AUGMENTED MODEL (DOES NOT ACCOUNT FOR SAMPLE SELECTION BIAS) ****

  
     
*** ASYMMETRIC LAPLACE MLE CONDITIONAL QUANTILE SURVIVAL REGRESSION PERCENTILES ["DUE DILIGENCE" MODEL] ***


laplacereg legvetdur  filipresdistancelewiszb filipresdistlewiszbtoplev2  senpartydiffmedianlewiszb senpartydiffmedlewiszbtoplev2  senworkload senhearing excalendarcong ///
senmajagencyideoloppose senmajagencyideolalign agencyindzb  agencyindzbtoplev2  soucountagency1  presappnom endsession newpresterm fvatreated  ///
toplevel2 zloyalmedianzb zloyalmedianzbtoplev2 zmecompmedian zpecompmedian  gender minority admintermyr1  admintermyr2 admintermyr3 ///
bush41 clinton bush43 if confirmselectin==1, failure(confirmobserved) quantiles (1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99) ///
seed(123) reps(1000)
*
estimates store model2
estout model2, cells(b(star fmt(3)) se(par fmt(2)))

***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************


*** POST-ESTIMATION LINCOMS ONLY FOR CONTEXTUAL POSITION TYPE SLOPE PARAMETER DIFFERENCES FOR "DUE DILIGENCE" COVARIATES ///
*** TO EVALUATE MAX-MIN RANGE IMPACT OF COVARIATE ON CONFIRMATION DELAY OUTCOME VARIABLE ***
  

***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************

 
set matsize 800           
 
*** ESTIMATE CONDITIONAL MIN - MAX [0.401 - 0.000 = 0.401] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q05]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q10]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q15]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q20]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q25]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q30]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q35]filipresdistlewiszbtoplev2   * 0.401 
*
lincom [q40]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q45]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q50]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q55]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q60]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q65]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q70]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q75]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q80]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q85]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q90]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q95]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q99]filipresdistlewiszbtoplev2   * 0.401
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use5.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']filipresdistlewiszbtoplev2 * 0.401
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use5.xlsx", sheet("Sheet1") clear


twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("|President-Senate Filibuster Pivot|", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-50(50)100, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure3A.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure3A.eps"

***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 


*** ESTIMATE CONDITIONAL MIN - MAX [0.118 - 0.000 = 0.118] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q05]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q10]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q15]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q20]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q25]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q30]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q35]senpartydiffmedlewiszbtoplev2 * 0.118 
*
lincom [q40]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q45]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q50]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q55]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q60]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q65]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q70]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q75]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q80]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q85]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q90]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q95]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q99]senpartydiffmedlewiszbtoplev2 * 0.118
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use6.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']senpartydiffmedlewiszbtoplev2 * 0.118
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use6.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Senate Party Polarization", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-200(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure3B.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure3B.eps"

***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 
 
*** ESTIMATE CONDITIONAL MIN - MAX [2.673 - 0 = 2.673] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]agencyindzbtoplev2 * 2.673
*
lincom [q05]agencyindzbtoplev2 * 2.673
*
lincom [q10]agencyindzbtoplev2 * 2.673
*
lincom [q15]agencyindzbtoplev2 * 2.673
*
lincom [q20]agencyindzbtoplev2 * 2.673
*
lincom [q25]agencyindzbtoplev2 * 2.673
*
lincom [q30]agencyindzbtoplev2 * 2.673
*
lincom [q35]agencyindzbtoplev2 * 2.673 
*
lincom [q40]agencyindzbtoplev2 * 2.673
*
lincom [q45]agencyindzbtoplev2 * 2.673
*
lincom [q50]agencyindzbtoplev2 * 2.673
*
lincom [q55]agencyindzbtoplev2 * 2.673
*
lincom [q60]agencyindzbtoplev2 * 2.673
*
lincom [q65]agencyindzbtoplev2 * 2.673
*
lincom [q70]agencyindzbtoplev2 * 2.673
*
lincom [q75]agencyindzbtoplev2 * 2.673
*
lincom [q80]agencyindzbtoplev2 * 2.673
*
lincom [q85]agencyindzbtoplev2 * 2.673
*
lincom [q90]agencyindzbtoplev2 * 2.673
*
lincom [q95]agencyindzbtoplev2 * 2.673
*
lincom [q99]agencyindzbtoplev2 * 2.673
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use7.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']agencyindzbtoplev2 * 2.673
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use7.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Decision Maker Independence", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-450(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure3C.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure3C.eps"

***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 
 
*** ESTIMATE CONDITIONAL MIN - MAX [4.6155 - 0.039 = 4.5765] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q05]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q10]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q15]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q20]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q25]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q30]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q35]zloyalmedianzbtoplev2  * 4.5765 
*
lincom [q40]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q45]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q50]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q55]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q60]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q65]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q70]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q75]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q80]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q85]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q90]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q95]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q99]zloyalmedianzbtoplev2  * 4.5765
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use8.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']zloyalmedianzbtoplev2 * 4.5765
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use8.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Presidential Nominee Loyalty", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-200(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure3D.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure3D.eps"
*
*
*
*graph 3
cd "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript"
*
gr combine Figure3A.gph  Figure3B.gph, b1title("Quantiles") iscale(1) 

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure3ABcomb.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure3ABcomb.eps"
*
*graph 4
gr combine Figure3C.gph  Figure3D.gph, b1title("Quantiles") iscale(1)

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure3CDcomb.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure3CDcomb.eps"




************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 


 
 

*** PART 3: MODELS ANALYZING PROCEDURAL VETTING ON SENATE FLOOR STAGE [CONFIRMATION DATE - REPORTED OUT OF SENATE COMMITTEE DATE] *** 


use "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Data/Confirmation Dynamics.Database.08-13-2020.FINAL.dta", replace


*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************

                                                                                                                                                                                                                                                                 

*** MODEL 3: PREDICTING TIME FROM REPORTED OUT OF SENATE COMMITTEE TO CONFIRMATION ON SENATE FLOOR [POLVETDUR] - NON-AUGMENTED MODEL (DOES NOT ACCOUNT FOR SAMPLE SELECTION BIAS) ****


 
*** ASYMMETRIC LAPLACE MLE CONDITIONAL QUANTILE SURVIVAL REGRESSION PERCENTILES ["DUE DILIGENCE" MODEL] ***


laplacereg polvetdur  filipresdistancelewiszb filipresdistlewiszbtoplev2  senpartydiffmedianlewiszb senpartydiffmedlewiszbtoplev2  senworkload senhearing excalendarcong ///
senmajagencyideoloppose senmajagencyideolalign agencyindzb  agencyindzbtoplev2  soucountagency1  presappnom endsession newpresterm fvatreated ///
toplevel2 zloyalmedianzb zloyalmedianzbtoplev2 zmecompmedian zpecompmedian  gender minority admintermyr1  admintermyr2 admintermyr3 ///
bush41 clinton bush43 if confirmselectin==1, failure(confirmobserved) quantiles (1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99) ///
seed(123) reps(1000)
*
estimates store model3
estout model3, cells(b(star fmt(3)) se(par fmt(2)))

*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 

*** POST-ESTIMATION LINCOMS ONLY FOR CONTEXTUAL POSITION TYPE SLOPE PARAMETER DIFFERENCES FOR "DUE DILIGENCE" COVARIATES ///
*** TO EVALUATE MAX-MIN RANGE IMPACT OF COVARIATE ON CONFIRMATION DELAY OUTCOME VARIABLE ***
  

***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************

 
set matsize 800           
 
*** ESTIMATE CONDITIONAL MIN - MAX [0.401 - 0.000 = 0.401] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q05]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q10]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q15]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q20]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q25]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q30]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q35]filipresdistlewiszbtoplev2   * 0.401 
*
lincom [q40]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q45]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q50]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q55]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q60]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q65]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q70]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q75]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q80]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q85]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q90]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q95]filipresdistlewiszbtoplev2   * 0.401
*
lincom [q99]filipresdistlewiszbtoplev2   * 0.401
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use9.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']filipresdistlewiszbtoplev2 * 0.401
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use9.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("|President-Senate Filibuster Pivot|", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-50(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure4A.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure4A.eps"



*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************** 
 


*** ESTIMATE CONDITIONAL MIN - MAX [0.118 - 0.000 = 0.118] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q05]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q10]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q15]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q20]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q25]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q30]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q35]senpartydiffmedlewiszbtoplev2 * 0.118 
*
lincom [q40]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q45]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q50]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q55]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q60]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q65]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q70]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q75]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q80]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q85]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q90]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q95]senpartydiffmedlewiszbtoplev2 * 0.118
*
lincom [q99]senpartydiffmedlewiszbtoplev2 * 0.118
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use10.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']senpartydiffmedlewiszbtoplev2 * 0.118
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use10.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Senate Party Polarization", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-100(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure4B.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure4B.eps"



***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 
 
*** ESTIMATE CONDITIONAL MIN - MAX [2.673 - 0 = 2.673] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]agencyindzbtoplev2 * 2.673
*
lincom [q05]agencyindzbtoplev2 * 2.673
*
lincom [q10]agencyindzbtoplev2 * 2.673
*
lincom [q15]agencyindzbtoplev2 * 2.673
*
lincom [q20]agencyindzbtoplev2 * 2.673
*
lincom [q25]agencyindzbtoplev2 * 2.673
*
lincom [q30]agencyindzbtoplev2 * 2.673
*
lincom [q35]agencyindzbtoplev2 * 2.673 
*
lincom [q40]agencyindzbtoplev2 * 2.673
*
lincom [q45]agencyindzbtoplev2 * 2.673
*
lincom [q50]agencyindzbtoplev2 * 2.673
*
lincom [q55]agencyindzbtoplev2 * 2.673
*
lincom [q60]agencyindzbtoplev2 * 2.673
*
lincom [q65]agencyindzbtoplev2 * 2.673
*
lincom [q70]agencyindzbtoplev2 * 2.673
*
lincom [q75]agencyindzbtoplev2 * 2.673
*
lincom [q80]agencyindzbtoplev2 * 2.673
*
lincom [q85]agencyindzbtoplev2 * 2.673
*
lincom [q90]agencyindzbtoplev2 * 2.673
*
lincom [q95]agencyindzbtoplev2 * 2.673
*
lincom [q99]agencyindzbtoplev2 * 2.673
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use11.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']agencyindzbtoplev2 * 2.673
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use11.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Decision Maker Independence", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-50(50)100, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure4C.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure4C.eps"


**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
*********************************************************************************************************************************************************************************************************
 
 
*** ESTIMATE CONDITIONAL MIN - MAX [4.6155 - 0.039 = 4.5765] RANGE EFFECTS [PURPOSE: EVALUATE SUBSTANTIVE NUMERICAL IMPACT OF COEFFICIENTS IN A COMPARABLE MANNER] ***

lincom [q01]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q05]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q10]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q15]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q20]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q25]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q30]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q35]zloyalmedianzbtoplev2  * 4.5765 
*
lincom [q40]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q45]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q50]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q55]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q60]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q65]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q70]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q75]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q80]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q85]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q90]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q95]zloyalmedianzbtoplev2  * 4.5765
*
lincom [q99]zloyalmedianzbtoplev2  * 4.5765
*
putexcel set "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use12.xlsx", modify
local i=1
foreach h in 01 05 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 99 {
quietly lincom [q`h']zloyalmedianzbtoplev2 * 4.5765
gen pointestimates`h' = r(estimate)
gen cilower`h' = pointestimates`h' - (1.96*r(se))
gen ciupper`h' = pointestimates`h' + (1.96*r(se))
putexcel A`i'= `h'
putexcel B`i'=(r(estimate)) 
putexcel C`i'=(r(estimate) - (1.96*r(se))) 
putexcel D`i'=(r(estimate) + (1.96*r(se))) 
local i=`i'+1
}
import excel "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/use12.xlsx", sheet("Sheet1") clear

twoway (rarea C D A, color(gs10)) (line B A, color(gs0)), title("Presidential Nominee Loyalty", size(medsmall)) ytitle("Confirmation Delay (Days)") xtitle("") ylabel(-50(50)50, angle(0)) legend(off) yline(0,lcolor(gs8) lpattern(dash))
*
graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure4D.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure4D.eps"

* 
*
*graph 5
cd "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript"
*
gr combine Figure4A.gph  Figure4B.gph, b1title("Quantiles") iscale(1) 

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure4ABcomb.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure4ABcomb.eps"
*
*graph 6
gr combine Figure4C.gph Figure4D.gph, b1title("Quantiles") iscale(1)

graph save "Graph" "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/Manuscript/Figure4CDcomb.gph"

graph export "/Users/JAYBYERS/Dropbox/Jason Byers/Co-Authored Projects/Projects with Krause/Krause Projects/Confirmation Dynamics Project/Nominee Characteristics Project/JOPDRMJB/Graphics/EPS/Manuscript/Figure4CDcomb.eps"


************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
 

log close





